package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShangShopCategoryMapper;
import com.ruoyi.system.domain.ShangShopCategory;
import com.ruoyi.system.service.IShangShopCategoryService;

/**
 * 商城分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-09
 */
@Service
public class ShangShopCategoryServiceImpl implements IShangShopCategoryService 
{
    @Autowired
    private ShangShopCategoryMapper shangShopCategoryMapper;

    /**
     * 查询商城分类
     * 
     * @param id 商城分类主键
     * @return 商城分类
     */
    @Override
    public ShangShopCategory selectShangShopCategoryById(Integer id)
    {
        return shangShopCategoryMapper.selectShangShopCategoryById(id);
    }

    /**
     * 查询商城分类列表
     * 
     * @param shangShopCategory 商城分类
     * @return 商城分类
     */
    @Override
    public List<ShangShopCategory> selectShangShopCategoryList(ShangShopCategory shangShopCategory)
    {
        return shangShopCategoryMapper.selectShangShopCategoryList(shangShopCategory);
    }

    /**
     * 新增商城分类
     * 
     * @param shangShopCategory 商城分类
     * @return 结果
     */
    @Override
    public int insertShangShopCategory(ShangShopCategory shangShopCategory)
    {
        return shangShopCategoryMapper.insertShangShopCategory(shangShopCategory);
    }

    /**
     * 修改商城分类
     * 
     * @param shangShopCategory 商城分类
     * @return 结果
     */
    @Override
    public int updateShangShopCategory(ShangShopCategory shangShopCategory)
    {
        return shangShopCategoryMapper.updateShangShopCategory(shangShopCategory);
    }

    /**
     * 批量删除商城分类
     * 
     * @param ids 需要删除的商城分类主键
     * @return 结果
     */
    @Override
    public int deleteShangShopCategoryByIds(Integer[] ids)
    {
        return shangShopCategoryMapper.deleteShangShopCategoryByIds(ids);
    }

    /**
     * 删除商城分类信息
     * 
     * @param id 商城分类主键
     * @return 结果
     */
    @Override
    public int deleteShangShopCategoryById(Integer id)
    {
        return shangShopCategoryMapper.deleteShangShopCategoryById(id);
    }
}
